package com.census.entity;

import javax.persistence.*;

/**
 * Created by WangKai's Hands.
 * User:WangKai
 * Date:2017/7/9
 * Time:14:11
 * Email: 1786025737@qq.com
 */
@Entity
@Table(name = "user_login", schema = "census", catalog = "")
public class UserLogin {
    private int loginId;
    private String cardId;
    private String password;
    private int loginSize;
    private String putInfo;

    @Id
    @Column(name = "login_id")
    public int getLoginId() {
        return loginId;
    }

    public void setLoginId(int loginId) {
        this.loginId = loginId;
    }

    @Basic
    @Column(name = "card_id")
    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    @Basic
    @Column(name = "password")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Basic
    @Column(name = "login_size")
    public int getLoginSize() {
        return loginSize;
    }

    public void setLoginSize(int loginSize) {
        this.loginSize = loginSize;
    }

    @Basic
    @Column(name = "put_info")
    public String getPutInfo() {
        return putInfo;
    }

    public void setPutInfo(String putInfo) {
        this.putInfo = putInfo;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        UserLogin userLogin = (UserLogin) o;

        if (loginId != userLogin.loginId) return false;
        if (loginSize != userLogin.loginSize) return false;
        if (cardId != null ? !cardId.equals(userLogin.cardId) : userLogin.cardId != null) return false;
        if (password != null ? !password.equals(userLogin.password) : userLogin.password != null) return false;
        if (putInfo != null ? !putInfo.equals(userLogin.putInfo) : userLogin.putInfo != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = loginId;
        result = 31 * result + (cardId != null ? cardId.hashCode() : 0);
        result = 31 * result + (password != null ? password.hashCode() : 0);
        result = 31 * result + loginSize;
        result = 31 * result + (putInfo != null ? putInfo.hashCode() : 0);
        return result;
    }
}
